package Object.fanxi;

/**
 * @author haomin
 * @date 2022/11/12 17:22
 **/
public class Demo2 {
    // 可以传入类型实参是 Integer 父类的任意类型的 MyArrayList
    public static void printAll(MyArrayList<? super Integer> list){}

    public static void main(String[] args) {
        printAll(new MyArrayList<Integer>());
        printAll(new MyArrayList<Number>());
        printAll(new MyArrayList<Object>());
    }
}

class MyArrayList<E> {}